Skip to content

Conversation

@kerkerj
Copy link

@kerkerj kerkerj commented Jan 3, 2022

For adapting both tracks/episodes when adding items to a user's playlist.
This resolves: #180

Spotify API reference: https://developer.spotify.com/documentation/web-api/reference/#/operations/add-tracks-to-playlist

@strideynet strideynet added this to the V3 milestone Jun 26, 2022
func (c *Client) AddItemsToPlaylist(ctx context.Context, playlistID ID, position int, items ...URI) (snapshotID string, err error) {
m := make(map[string]interface{})
m["uris"] = items
m["position"] = position
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it impossible for users to fall back to the behaviour of appending items to the playlist when the position value is not provided - we should make this a functional option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AddTracksToPlaylist could not accept adding episodes of podcasts

2 participants